package com.doit.day03

import scala.io.Source

object _01_闪开_我要装逼了 {
  def main(args: Array[String]): Unit = {
    Source
      .fromFile("data/bulkload.txt")
      .getLines()
      .toList
      .flatMap(_.split(","))
      .groupBy(word=>word)
      .map(tp=>(tp._1,tp._2.size))
      .toList
      .sortBy(_._2)
      .foreach(println)
  }

}
